package com.example.springbootgoods.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.springbootgoods.entity.Assess;
import com.example.springbootgoods.entity.Brand;
import com.example.springbootgoods.mapper.BrandMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BrandService {
    @Autowired
    BrandMapper brandMapper;

    /**
     * 根据是商品类型id查询品牌
     * @param classId
     * @return
     */
    public List<Brand> selectById(int classId){
        QueryWrapper<Brand> queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("classId",classId);
        List<Brand> list=brandMapper.selectList(queryWrapper);
        return list;
    }
}
